package com.blog.aop;

import org.apache.log4j.Logger;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;

import org.springframework.stereotype.Component;



@Aspect

@Component

public class Cut1 {
	Logger log= Logger.getLogger(Cut1.class);

	//@Before("execution(* com.blog.service.impl.*.*(..))")
	//@Around("execution(* com.blog.service.impl.articleService.getArticleById(..))")
	public void before(){
		System.out.println("我是before");
		//HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
		//System.out.println(request.getLocalAddr());
		//log.info("before切面");

		//System.out.println("before执行");

	}

	
	//@After("execution(* com.blog.service.impl.articleService.getArticleById(..))")
	public void after(){
		//if(!new Integer(200).equals(response.getStatus())){System.out.println("有问题啊");}
		//log.info("after切面");
		System.out.println("我是after");
		//System.out.println("after执行");

	}
}